package com.zhuhjay.chat.util;

import java.util.concurrent.atomic.LongAdder;

/**
 * @author ZhuHJay
 * @date 2023/3/10 22:51
 */
public class GenericSequenceId {
    private static final LongAdder COUNTER = new LongAdder();

    public static int nextId() {
        int value = COUNTER.intValue();
        COUNTER.increment();
        return value;
    }
}
